<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.3.0/jquery.min.js"></script>
<title>SkyNet</title>
</head>
<script type="text/javascript">
	function ajaxTest() {
		var type = "2";
		$.ajax({
			type : "post",
			url : "pub/welCome",
			dataType : "json",
			data : {reqType : type} ,
			success : function(data) {
				if(data.errorCode == "00000"){
					$("#div1").html(data.data.welMsg);
				}else{
					alert(data.message);
				}
			},
			error : function(XMLHttpRequest, textStatus, errorThrown) {
				alert(errorThrown);
			}
		});
	}
	function ajaxTest1() {
		var type = "2";
		$.ajax({
			type : "post",
			url : "api/welCome",
			dataType : "json",
			data : {reqType : type} ,
			success : function(data) {
				if(data.errorCode == "00000"){
					$("#div1").html(data.data.welMsg);
				}else{
					alert(data.message);
				}
			},
			error : function(XMLHttpRequest, textStatus, errorThrown) {
				alert(errorThrown);
			}
		});
	}
</script>
<body>
	这是html
	<div id="div1"></div>
	<button type="button" onclick="ajaxTest()">测试公共接口</button>
	<button type="button" onclick="ajaxTest1()">测试授权内容接口</button>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#div1").html("呵呵");
		});
	</script>
</body>
</html>